1. Field of the Invention
The present invention relates to an image processing apparatus and method, and more particularly, to an image processing apparatus and method for performing scaling processing on image data including a plurality of signals having different data rates.
2. Description of Related Art
In recent years, there is a need for a technique to convert an aspect ratio of image data in the field of image processing. For example, image data which is included in television video data and distributed with an aspect ratio of 4:3 is converted into image data with an aspect ratio of 16:9 or the like by performing scaling processing.
Japanese Unexamined Patent Application Publication No. 2003-189266 discloses an image processing apparatus capable of performing a continuous, more natural enlargement process on the entire display screen. The image processing apparatus disclosed in Japanese Unexamined Patent Application Publication No. 2003-189266 includes a DDA (Digital Differential Analyzer) operation unit that allows a central portion of a single image to be enlarged linearly and allows both end portions thereof to be enlarged non-linearly, when video data having the aspect ratio of 4:3 is enlarged in the horizontal direction for a video display apparatus having the aspect ratio of 16:9. In particular, the image processing apparatus disclosed in Japanese Unexamined Patent Application Publication No. 2003-189266 controls each resampling point of a source image with the use of the DDA operation unit so as to generate pixel data of a destination image.
FIG. 10 is a block diagram showing the configuration of the image processing apparatus disclosed in Japanese Unexamined Patent Application Publication No. 2003-189266. An image conversion unit 90 included in an image processing apparatus 9 includes a memory unit 91, a resampling unit 92, and a DDA operation unit 93. The memory unit 91 stores source image data to be subjected to scaling processing. The DDA operation unit 93 calculates the resampling point, which is a position at which the source image data is acquired, based on the position of destination image data. In this case, the DDA operation unit 93 calculates the resampling point by linear function processing, quadric function processing, and cubic function processing by using the previous resampling point and an increment thereof, and then outputs the calculated resampling point to the memory unit 91 and the resampling unit 92. The resampling unit 92 acquires image data corresponding to the resampling point, from the memory unit 91 to perform the scaling processing on the acquired image data, and then outputs the destination image data.
In this case, Delta represents an increment of a resampling point. In the linear scaling, Delta is a constant value and is also a reciprocal of an enlargement ratio. Further, an increment of Delta is defined as Delta2 and an increment of Delta2 is defined as Delta3, thereby enabling shifting of the resampling point in a cubic function manner. Furthermore, in order to achieve non-linear scaling in the both end portions, the area of the destination image is divided into three areas. Then, linear scaling is performed on the central portion by shifting the resampling point in a linear function manner, and non-linear scaling is performed on the both end portions by shifting the resampling point in a cubic function manner.
FIG. 11 is a flowchart showing processing for calculating the resampling point according to Japanese Unexamined Patent Application Publication No. 2003-189266. First, the DDA operation unit 93 initializes parameters (S901). Herein, “DstWidth” represents a processing end position of the destination image data. Additionally, “LinearStart” represents a position of the destination image data at which the linear scaling is started, and “LinearEnd” represents a position of the destination image data at which the linear scaling is finished. “OutCount” represents a current position of the destination image data to be processed.
Next, the DDA operation unit 93 determines whether OutCount is less than “DstWidth” (S902). When determining that OutCount is equal to or greater than “DstWidth”, the DDA operation unit 93 finishes the processing. When determining that OutCount is less than “DstWidth”, the DDA operation unit 93 adds Delta to “ResamplingPoint” (S903).
Then, the DDA operation unit 93 determines whether OutCount corresponds to the both end portions (S904). When determining that OutCount corresponds to the both end portions, the DDA operation unit 93 adds Delta2 to Delta and also adds Delta3 to Delta2 (S905). When determining that OutCount does not correspond to the both end portions, that is, determining that OutCount corresponds to the central portion, the DDA operation unit 93 determines whether OutCount is equal to “LinearStart” (S906). When determining that OutCount is equal to “LinearStart”, the DDA operation unit 93 inverts the sign of Delta2 (S907). When determining that OutCount is other than “LinearStart”, the DDA operation unit 93 adds “1” to OutCount (S908) after the processing of Steps S905 and S907. After that, the process returns to Step S902.
Assuming herein that the pixel number of the destination image is represented by x (x=0, 1, 2, . . . ) and the resampling point obtained at the time is represented by f(x), d1(x) serving as Delta in the pixel number x can be expressed by the following relational expression (1).d1(x)=f(x+1)−f(x)  (1)
Further, d2(x) serving as Delta2 in the pixel number x can be expressed by the following relational expression (2).d2(x)=d1(x+1)−d1(x)  (2)
Furthermore, d3(x) serving as Delta3 in the pixel number x can be expressed by the following relational expression (3).d3(x)=d2(x+1)−d2(x)=constant   (3)
The relational expressions (1), (2), and (3) are given as shown in FIGS. 12A to 12C. Herein, f(x) represents a cubic expression of x in a non-linear section, that is, a cubic processing section, and also represents a linear expression of x in a linear section, that is, a linear processing section.
FIGS. 12A to 12C are graphs each showing changes in DDA operands corresponding to output pixels in Japanese Unexamined Patent Application Publication No. 2003-189266. FIG. 12A is a graph showing changes in resampling point. FIG. 12B is a graph showing changes in Delta. FIG. 12C is a graph showing changes in Delta2.
Japanese Unexamined Patent Application Publication Nos. 2007-60105 and 2007-74526 are disclosed as related art. Japanese Unexamined Patent Application Publication No. 2007-60105 discloses an image data conversion apparatus that converts source image data having an original aspect ratio into data having an output aspect ratio. The image data conversion apparatus disclosed in Japanese Unexamined Patent Application Publication No. 2007-60105 includes parameter generation means for varying parameters for conversion according to the output aspect ratio.
Japanese Unexamined Patent Application Publication No. 2007-74526 discloses an image processing apparatus to solve a problem of a loss of a color-difference signal, upon combining a plurality of image data items given by a component signal including a luminance signal and two color-difference signals at a data rate of 4:2:2. The image processing apparatus disclosed in Japanese Unexamined Patent Application Publication No. 2007-74526 converts the component signal having the data rate of 4:2:2 into a component signal having a data rate of 4:4:4, and generates a composite video signal so that an image is displayed by giving priority to a component signal of an image of a higher priority in accordance with a predetermined priority order.